package com.hera.process.config.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.TableGenerator;

import com.hera.base.domain.BaseDomain;


@Entity
@Table(name="OPTIONS")
public class Option extends BaseDomain implements Serializable{

	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy = GenerationType.TABLE, generator = "SEQ_OPTION")
	@TableGenerator(name = "SEQ_OPTION", table = "sequence", pkColumnName = "seq_name", 
	valueColumnName = "seq_id",         pkColumnValue = "Option", allocationSize = 1)
	@Column(name="ID_OPTION")		
	private Long idOpcion;
	@ManyToOne
	@JoinColumn(name="ID_FATHER", referencedColumnName = "ID_OPTION")
	private Option father;
	@Column(name="NAME")
	private String name;
	@Column(name="DESCRIPTION")
	private String description;
	@Column(name="CODE")
	private String code;
	
	public Option() {
	}

	public Long getIdOpcion() {
		return idOpcion;
	}

	public void setIdOpcion(Long idOpcion) {
		this.idOpcion = idOpcion;
	}

	public Option getFather() {
		return father;
	}

	public void setFather(Option father) {
		this.father = father;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}
	
	
}
